﻿using System;
using DevExpress.Web.ASPxPopupControl;
using olierFrm.WebFormDev;

namespace WebFormDev.Plugin
{
    public partial class tempASPxPopupControl : System.Web.UI.Page
    {
        protected void Page_PreInit(object sender, EventArgs e)
        {
            ManageSystem.IsLogin();
            ManageSystem.SetTheme(Page);
            //没有QueryName只显示菜单，为了重复利用该页面（系统首页和StdQuery）

        }
        protected void Page_Load(object sender, EventArgs e)
        {
            string PopupID = Request.QueryString["PopupID"];
            var index = PopupID.Split('_')[1];
            var dialog = new ASPxPopupControl()
            {
                CloseAction = DevExpress.Web.ASPxClasses.CloseAction.CloseButton,
                Modal = true,
                PopupHorizontalAlign = DevExpress.Web.ASPxClasses.PopupHorizontalAlign.WindowCenter,
                PopupVerticalAlign = DevExpress.Web.ASPxClasses.PopupVerticalAlign.WindowCenter,
                ClientInstanceName = PopupID,
                HeaderText = "查找选择",
                AllowDragging = true,
                Width = 600,
                Height = 500,
                EnableAnimation = false,
                AllowResize = true,
                EnableViewState = false,
            };
            dialog.ClientSideEvents.Closing = "function(s,e){$('#div_dialogSelTemp_"+index+"').remove();}";
            dialog.ContentStyle.Paddings.Padding = 0;
            form1.Controls.Add(dialog);
        }
    }
}